<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>预约挂号</title>
    <link rel="stylesheet" type="text/css" href="css/aui.css" />
		<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body>
    <div class="site-name">
      <p>北京114预约挂号平台</p>
    </div>

    <div class="yuyue-container">
      <div class="yuyue-wrapper">
        <div class="yuyue-title">
          <span >中国医学科学院肿瘤医院</span>
          <span id="m_name"></span>
        </div>
        <div class="yuyue-name">
          <h4 id="k_name"></h4>
        </div>
        <div class="common-nav">
          <div class="common-tab">
            <a href="javascript:;" class="common-tab-active" data-type="1">按日期挂号</a>
          </div>
          <div class="common-tab">
            <a href="javascript:;" data-type="2">按专家挂号</a>
          </div>
        </div>
        <div class="yuyue-date">
          <div class="yuyue-time-list" id="my_div_2">
<!--            <div class="yuyue-time-item yuyue-time-item-active" data-status="1">-->
<!--              <span>周四</span>-->
<!--              <p>11月26号</p>-->
<!--              <i>无号</i>-->
<!--            </div>-->
<!--            <div class="yuyue-time-item" data-status="2">-->
<!--              <h5>周四</h5>-->
<!--              <strong>11月26号</strong>-->
<!--              <em>有号</em>-->
<!--            </div>-->
<!--            <div class="yuyue-time-item" data-status="3">-->
<!--              <span>周四</span>-->
<!--              <p>11月26号</p>-->
<!--              <i>约满</i>-->
<!--            </div>-->
<!--            <div class="yuyue-time-item" data-status="1">-->
<!--              <span>周四</span>-->
<!--              <p>11月26号</p>-->
<!--              <i>无号</i>-->
<!--            </div>-->
<!--            <div class="yuyue-time-item" data-status="1">-->
<!--              <span>周四</span>-->
<!--              <p>11月26号</p>-->
<!--              <i>无号</i>-->
<!--            </div>-->
<!--            <div class="yuyue-time-item" data-status="1">-->
<!--              <span>周四</span>-->
<!--              <p>11月26号</p>-->
<!--              <i>无号</i>-->
<!--            </div>-->
<!--            <div class="yuyue-time-item" data-status="1">-->
<!--              <span>周四</span>-->
<!--              <p>11月26号</p>-->
<!--              <i>无号</i>-->
<!--            </div>-->
<!--            <div class="yuyue-time-item" data-status="1">-->
<!--              <span>周四</span>-->
<!--              <p>11月26号</p>-->
<!--              <i>无号</i>-->
<!--            </div>-->
          </div>

          <div class="yuyue-time-choose">
            <span>查看</span>
            <span>日期</span>
          </div>
        </div>
        <div class="yuyue-have" style="display:none;">
          <div class="yuyue-doctor-title">
            <h4>上午号源</h4>
          </div>
          <div class="yuyue-doctor-list">
            <div class="yuyue-doctor-item">
              <div class="yuyue-doctor-info">
                <div class="yuyue-doctor-user">
                  <h4>普通门诊</h4>
                  <em>|</em>
                  <span>普通门诊</span>
                </div>
                <div class="yuyue-doctor-desc">
                  <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                </div>
              </div>
              <div id="div_1" >
                <h4>￥50</h4>
              </div>
              <a id="a_1">
<!--                <h4>剩余</h4>-->
<!--                <span id="my_span_1">5</span>-->
              </a>
            </div>
            <div class="yuyue-doctor-title">
              <h4>下午号源</h4>
            </div>
            <div class="yuyue-doctor-item">
              <div class="yuyue-doctor-info">
                <div class="yuyue-doctor-user">
                  <h4>普通门诊</h4>
                  <em>|</em>
                  <span>普通门诊</span>
                </div>
                <div class="yuyue-doctor-desc">
                  <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                </div>
              </div>
              <div id="div_2">
                <h4>￥50</h4>
              </div>
              <a id="a_2">
<!--                <h4 >约满</h4>-->
<!--                <span id="my_span_2"></span>-->
              </a>
            </div>
          </div>
        </div>

        <div class="yuyue-empty" style="display:block;">
          <p>当天已无号，请查看其他日期号源</p>
        </div>


        <div class="doctor-list" style="display:none;">
          <h5>暂无专家，请安日期挂号！！</h5>
        </div>

      </div>
    </div>

    <div class="div-line"></div>

		<div class="filter-container">
			<div class="filter-wrapper">
				<div class="filter-tui">
					<h4>推荐科室</h4>
				</div>
				<div class="filter-right">
					<div class="filter-item filter-item-active">
            <span>综合排序</span>
            <i class="filter-rank"></i>
          </div>
          <div class="filter-item">
            <span>按距离</span>
            <i class="filter-location"></i>
          </div>
				</div>
			</div>

		</div>

    <div class="common-list" style="margin-top:0px;">
      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_5.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_4.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_2.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_1.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_1.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_5.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_3.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_5.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_4.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_2.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_1.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_1.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_5.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

      <div class="common-item">
        <div class="common-item-top">
          <div class="common-logo">
            <img src="images/hos_3.png"/>
          </div>
          <div class="common-body">
            <h4>北京协和医院</h4>
            <span>三级甲等</span>
          </div>
        </div>

        <div class="common-item-bottom">
          <a href="yuyue.html">核酸检测1</a>
          <a href="yuyue.html">核酸检测222</a>
          <a href="yuyue.html">核酸检测2</a>
          <a href="yuyue.html">核酸检测33333</a>
          <a href="yuyue.html">核酸检测4</a>
          <a href="yuyue.html">核酸检测33</a>
          <a href="yuyue.html">核酸检测22</a>
        </div>

      </div>

    </div>


    <div class="date-layer" style="display:none;">
      <div class="date-layer-title">
        <span class="aui-iconfont aui-icon-left"></span>
        <h4></h4>
        <span class="aui-iconfont aui-icon-right"></span>
        <i class="aui-iconfont aui-icon-close date-layer-close"></i>
      </div>
      <div class="date-layer-body">

        <div class="date-layer-week">
          <span>一</span>
          <span>二</span>
          <span>三</span>
          <span>四</span>
          <span>五</span>
          <span>六</span>
          <span>日</span>
        </div>

        <div class="date-year-list">

        </div>

      </div>
    </div>
</body>
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="layer/layer.js"></script>
<script type="text/javascript">

  function getreq(name) {
    var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
    var r = window.location.search.substr(1).match(reg);
    if (r != null) {
      return decodeURI(r[2]);
    }
    return null;
  }
  var mid = getreq("id");
  var name = getreq("name");
  var k_name = getreq("k_name");
  $("#m_name").html(name);
  $("#k_name").html(k_name);

  function getWeekDate(day) {
    var weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
    var week = weeks[day];
    return week;
  }

  var str = "";
  var aa = new Array();
  var date1 = new Date();
  var time1=date1.getFullYear()+"-"+(date1.getMonth()+1)+"-"+date1.getDate();
  aa.push(time1)
  function fun_date(aa){
    var date1 = new Date();
    var time1=date1.getFullYear()+"-"+(date1.getMonth()+1)+"-"+date1.getDate();//time1表示当前时间
    var date2 = new Date(date1);
    date2.setDate(date1.getDate()+aa);
    var time2 = date2.getFullYear()+"-"+(date2.getMonth()+1)+"-"+date2.getDate();
    return time2;
  }
  for (var i=1;i<8;i++){
    aa.push(fun_date(i))
  }
  for (var i=0;i<aa.length;i++){
    var sh = parseInt(aa[i].substring(aa.length))%7
    $.ajax({
      type: "post",
      url: "http://guowang.nat300.top/wechat114/gform/selectOne",
      data:{"mid":mid,"day":aa[i]},
      async:false,
      dataType: "json",
      success: function (data) {
        if (data.data.gnum == "0"){
          str += "<div class='yuyue-time-item' data-status='1'><span>"+data.data.week+"</span><p>"+aa[i]+"</p><em>无号</em></div>";
        }else {
          str += "<div class='yuyue-time-item' data-status='2'><span>"+data.data.week+"</span><p>"+aa[i]+"</p><em>有号</em></div>";
        }
      }
    })
  }
  $("#my_div_2").html(str)

$('.origin-list').css('paddingTop',120);

$('.filter-item').click(function () {
  $('.filter-item').removeClass('filter-item-active');
  $(this).addClass('filter-item-active');
})

$('.filter-left').click(function () {
  var name = $(this).find('i').attr('class');
  if(name=='arrow-down'){
    $(this).find('i').removeClass('arrow-down');
    $(this).find('i').addClass('arrow-up');
    $('.filter-area-list').css('display','flex');
  }
  else if(name=='arrow-up'){
    $(this).find('i').addClass('arrow-down');
    $(this).find('i').removeClass('arrow-up');
    $('.filter-area-list').css('display','none');
  }
})

$('.filter-area-item').click(function () {
    $('.filter-area-item').removeClass('filter-area-active');
    $(this).addClass('filter-area-active');

    $('.filter-left').find('i').addClass('arrow-down');
    $('.filter-left').find('i').removeClass('arrow-up');
    $('.filter-area-list').css('display','none');
})

$('.yuyue-time-item').click(function () {
  var data1 = $(this).children("p").html();
  var shang = "<h4>剩余</h4>\n" +
          "<input type='hidden' id='shang' value='1'>\n" +
          "        <span id=\"my_span_1\"></span>";
  var xia = "<h4>约满</h4>\n" +
          "        <span id=\"my_span_1\"></span>";
  var shang1 = "<h4>剩余</h4>\n" +
          "<input type='hidden' id='xia' value='2'>\n" +
          "        <span id=\"my_span_2\"></span>";
  var xia1 = "<h4>约满</h4>\n" +
          "        <span id=\"my_span_2\"></span>";
  $('.yuyue-time-item').removeClass('yuyue-time-item-active');
  $(this).addClass('yuyue-time-item-active');
  var status = $(this).attr('data-status');
  $.ajax({
    type: "post",
    url: "http://guowang.nat300.top/wechat114/gform/selectOne",
    data:{"mid":mid,"day":$(this).children("p").html()},
    async:false,
    dataType: "json",
    success: function (data) {
    /*<a class="yuyue-doctor-btn yuyue-doctor-btn-active" href="submit.html" id = "a_1">
        </a>
        <a class="yuyue-doctor-btn" id = "a_2">
      </a>*/
      if(status=='1'){
        $('.yuyue-empty').css('display','block');
        $('.yuyue-have').css('display','none');
        $('.yuyue-full').css('display','none');
      }
      else if (status=='2') {
        if (data.data.upnum == "0"){
          $("#div_1").attr("class","yuyue-doctor-price")
          $("#a_1").attr("class","yuyue-doctor-btn")
          $("#a_1").html(xia)
        }else {
          $("#a_1").html(shang)
          $("#div_1").attr("class","yuyue-doctor-price yuyue-doctor-price-active")
          $("#a_1").attr("class","yuyue-doctor-btn yuyue-doctor-btn-active")
          $("#a_1").attr("href","submit.html?name="+k_name+"&data="+data1+"&status="+$("#shang").val()+"&mid="+mid);

        }
        if (data.data.downnum == "0"){
          $("#div_2").attr("class","yuyue-doctor-price")
          $("#a_2").attr("class","yuyue-doctor-btn")
          $("#a_2").html(xia1)
        }else {
          $("#a_2").html(shang1)
          $("#div_2").attr("class","yuyue-doctor-price yuyue-doctor-price-active")
          $("#a_2").attr("class","yuyue-doctor-btn yuyue-doctor-btn-active")
          $("#a_2").attr("href","submit.html?name="+k_name+"&data="+data1+"&status="+$("#xia").val()+"&mid="+mid);

        }
        $("#my_span_1").html(data.data.upnum)
        $("#my_span_2").html(data.data.downnum)
        $('.yuyue-empty').css('display','none');
        $('.yuyue-have').css('display','block');
        $('.yuyue-full').css('display','none');
      }
      else if (status=='3') {
        $('.yuyue-empty').css('display','none');
        $('.yuyue-have').css('display','none');
        $('.yuyue-full').css('display','block');
      }
    }
  })


})

//获取多少天
function getMonthDay(year, month) {
  let days = new Date(year, month, 0).getDate()
  return days
}

//随机数函数
function random(min, max) {
  return Math.floor(Math.random() * (max - min)) + min;
}

/*获取上个月*/
function getPreMonth(date) {
	var arr = date.split('-');
	var year = arr[0]; //获取当前日期的年份
	var month = arr[1]; //获取当前日期的月份
	var day = arr[2]; //获取当前日期的日
	var days = new Date(year, month, 0);
	days = days.getDate(); //获取当前日期中月的天数
	var year2 = year;
	var month2 = parseInt(month) - 1;
	if (month2 == 0) {
		year2 = parseInt(year2) - 1;
		month2 = 12;
	}
	var day2 = day;
	var days2 = new Date(year2, month2, 0);
	days2 = days2.getDate();
	if (day2 > days2) {
		day2 = days2;
	}
	if (month2 < 10) {
		month2 = '0' + month2;
	}
	var t2 = year2 + '-' + month2 + '-' + day2;
	return t2;
}

/*获取下个月*/
function getNextMonth(date) {
	var arr = date.split('-');
	var year = arr[0]; //获取当前日期的年份
	var month = arr[1]; //获取当前日期的月份
	var day = arr[2]; //获取当前日期的日
	var days = new Date(year, month, 0);
	days = days.getDate(); //获取当前日期中的月的天数
	var year2 = year;
	var month2 = parseInt(month) + 1;
	if (month2 == 13) {
		year2 = parseInt(year2) + 1;
		month2 = 1;
	}
	var day2 = day;
	var days2 = new Date(year2, month2, 0);
	days2 = days2.getDate();
	if (day2 > days2) {
		day2 = days2;
	}
	if (month2 < 10) {
		month2 = '0' + month2;
	}
	var t2 = year2 + '-' + month2;
	return t2;
}

//获取年份、月
var date=new Date;
var year = date.getFullYear();
var month = date.getMonth() + 1;
var days = getMonthDay(year,month);
var arr = new Array();

$('.date-layer-title h4').html(year+'年'+month+'月');

for (var i = 1; i <= days; i++) {
  var date=new Date();
  var week = date.getDay();
  date.setDate(i);
  var dateStart = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  var date_year = date.getFullYear();
  var date_month = date.getMonth() + 1;
  var date_day = date.getDate();
  var status = random(1,4)
  date_month = String(date_month>9?date_month:'0'+date_month);
  date_day = String(date_day>9?date_day:'0'+date_day);

  var obj = {
    date:date_year+'-'+date_month+'-'+date_day,
    number:date_day,
    week:week,
    status:status
  }
  arr.push(obj);
}

var empty = arr[0].week==0?6:arr[0].week-1;

//生成占位
var html = '';
for (var i = 0; i < empty; i++) {
    html += '<div class="date-year-item"></div>';
}
$('.date-year-list').html(html);

//1无号 2有号 3约满

var html = $('.date-year-list').html();
for (var i = 0; i < arr.length; i++) {
    switch (arr[i]['status']) {
      case '1':
        html += '<div class="date-year-item"><div class="date-year-wrap date-year-item-no"><span>'+arr[i]['number']+'</span><em>无号</em></div></div>';
        break;
      case '2':
        html += '<div class="date-year-item"><div class="date-year-wrap date-year-item-have"><span>'+arr[i]['number']+'</span><em>有号</em></div></div>';
        break;
      case '3':
        html += '<div class="date-year-item"><div class="date-year-wrap date-year-item-full"><span>'+arr[i]['number']+'</span><em>约满</em></div></div>';
        break;
      default:
    }

}
$('.date-year-list').html(html);

$('.yuyue-time-choose').click(function () {
  layer.open({
    type: 1,
    anim: 2,
    title: false,
    closeBtn: false,
    offset: 'b',
    area: ['100%','auto'],
    shadeClose: true,
    content: $('.date-layer')
  });
})

$('.date-layer-close').click(function functionName() {
  layer.closeAll();
})


$('.common-tab a').click(function () {
  $('.common-tab a').removeClass('common-tab-active');
  $(this).addClass('common-tab-active');

  var type = $(this).attr('data-type');
  if(type=='1'){
    $('.yuyue-empty').css('display','block');
    $('.yuyue-have').css('display','none');
    $('.yuyue-full').css('display','none');
    $('.yuyue-date').css('display','block');
    $('.doctor-list').css('display','none');
  }
  else{
    $('.yuyue-empty').css('display','none');
    $('.yuyue-have').css('display','none');
    $('.yuyue-full').css('display','none');
    $('.yuyue-date').css('display','none');
    $('.doctor-list').css('display','block');
  }
})
</script>

</html>
